Component({
  mixins: [],
  data: {},
  props: {
    flagIndex: {
      type: Number,
      value: 1,
    }
  },
  didMount() {},
  didUpdate() {},
  didUnmount() {},
  methods: {
    btnScan() {
      my.scan({
          success(res) {
              //保留当前页跳转
              my.navigateTo({
                  url: "/pages/guide/guide?q=" + res.result,
              })
          }
      })
    },
    toPage(e){
      const {page,id} = e.currentTarget.dataset;
      if(id && id==this.props.flagIndex) return;
      my.reLaunch({url: page})
    }
  },
});
